package com.example.zn.controller;

import com.example.zn.dto.Result;
import com.example.zn.entity.Dingdan;
import com.example.zn.service.DingdanService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name= "订单管理",description = ("订单添加，列表查看,订单删除，订单状态等操作"))
@CrossOrigin
@RestController



public class DingdanController {
    @Autowired
    private DingdanService dingdanService;

    @Operation(summary = "查询所有订单",description = "显示所有歌单列表")
    @GetMapping("/Dingdan/list")
    public Result queryAll(){
        List<Dingdan> list = dingdanService.list();
        return Result.ok().setData(list);

    }


}
